package cn.xopencode.recordservice.convert.maintransformer;

import cn.xopencode.common.framework.vo.PageResult;
import cn.xopencode.recordservice.dal.mysql.dataobject.maintransformer.MainTransformerRecordDO;
import cn.xopencode.recordservice.rpc.maintransformer.dto.MainTransformerRecordCreateDTO;
import cn.xopencode.recordservice.rpc.maintransformer.dto.MainTransformerRecordPageDTO;
import cn.xopencode.recordservice.rpc.maintransformer.dto.MainTransformerRecordUpdateDTO;
import cn.xopencode.recordservice.rpc.maintransformer.vo.MainTransformerRecordPageVO;
import cn.xopencode.recordservice.rpc.maintransformer.vo.MainTransformerRecordUpdateVO;
import cn.xopencode.recordservice.service.maintransformer.bo.MainTransformerRecordCreateBO;
import cn.xopencode.recordservice.service.maintransformer.bo.MainTransformerRecordPageBO;
import cn.xopencode.recordservice.service.maintransformer.bo.MainTransformerRecordUpdateBO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;



@Mapper
public interface MainTransformerRecordConvert {
    MainTransformerRecordConvert INSTANCE = Mappers.getMapper(MainTransformerRecordConvert.class);

    MainTransformerRecordDO convert(MainTransformerRecordCreateBO bean);

    MainTransformerRecordCreateBO convert(MainTransformerRecordCreateDTO bean);

    MainTransformerRecordPageBO convert(MainTransformerRecordPageDTO bean);

    @Mapping(source = "records", target = "list")
    PageResult<MainTransformerRecordPageVO> convertPage(IPage<MainTransformerRecordDO> page);

    MainTransformerRecordUpdateVO convertUpdate(MainTransformerRecordDO bean);

    MainTransformerRecordUpdateBO convert(MainTransformerRecordUpdateDTO bean);

    MainTransformerRecordDO convert(MainTransformerRecordUpdateBO bean);


}
